package com.yaoli.Proxy;

/**
 * Created by siemens on 6/1/2017.
 */
public class Test {
    public static void main(String[] args) {
//        Count count = new CountImpl();
//        CountProxy proxy = new CountProxy(count);
//        proxy.queryCount();
//        proxy.queryCount();

//        CountJDKProxy proxy = new CountJDKProxy();
//        Count impl = (Count)proxy.bind(new CountImpl());
//        impl.queryCount();

        CountCglibProxy proxy = new CountCglibProxy();
        CountImpl count = (CountImpl)proxy.getInstance(new CountImpl());
        count.queryCount();

    }
}
